<template>
	<view class="cu-modal" :class="modalState.modals=='successUesModal'?'show':''" @touchmove.stop.prevent="()=>{return}" @tap="hideModal">
		<view class="cu-dialog" @tap.stop>
			<view class="cu-bar bg-white justify-end">
				<view class="content">{{$t('JLink.prompt.title')}}</view>
			</view>
			<!-- 成功使用，是否查看订单? -->
			<view class="padding-xl">{{$t('JLink.prompt.use.text1')}}</view>
			<view class="cu-bar bg-white">
				<view class="action margin-0 flex-sub " @tap="hideModal">{{$t('JLink.publicText.no')}}</view>
				<view class="action margin-0 flex-sub text-primary solid-left" @tap="confirm">{{$t('JLink.publicText.yes')}}</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
  props: {
    modalName: {
      type: String,
      default: ''
    },
    title: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      modalState: {
        modals: this.modalName
      }
    }
  },
  watch:{
    modalName(news, olds){
      this.modalState.modals = news;
    }
  },
  methods: {
    confirm () {
      this.$routing(this.$pages.order.list)
    },
    hideModal () {
      this.$emit('updateModalName', '')
    }
  }
}
</script>

<style lang="less" scoped>
@import '@/common/style/main.css';
</style>
